<template>
  <div class="home-header">
    <div class="logo">
      <img src="../assets/heima.png" alt="">
      <h1>电商后台管理系统</h1>
    </div>
    <el-button type="info" @click="quit">退出</el-button>
  </div>
</template>

<script setup lang='ts'>
import router from '../router';

const quit = () => {
  window.sessionStorage.removeItem('hmds-token')
  router.push('/login')
}
</script>

<style lang='scss' scoped>
.home-header {
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  height: 60px;
  background-color: #373d41;
  align-items: center;
  .el-button {
    vertical-align:middle;
  }
}
.logo {
  display: flex;
  img {
    margin-right: 20px;
  }
  h1 {
    font-size: 20px;
    color: #fff;
  }
}
</style>